#!/usr/bin/env python
#_*_coding:utf-8 _*_
#__author__:Davidlua

import smtplib
import string

HOST = "smtp.qq.com"
SUBJECT = "Test email from Python  666"
TO = "27725965@qq.com"
FROM = "343254089@qq.com"
text = "Python rules them all! "
BODY = string.join((
    "From: %s" % FROM,
    "To: %s" % TO,
    "Subject: %s" % SUBJECT,
    "",
    text
),"\r\n")

server = smtplib.SMTP()
server.connect(HOST,"25")
server.starttls()
server.login("343254089@qq.com","mypassword")
server.sendmail(FROM,[TO],BODY)
server.quit()